	<include file="Public:header" />
<script type="text/javascript"> 
$(function(){
    $('#addPart').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success:function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            adname : {
                required : true,
				rangelength : [3,10],
            },
            adpw : {
                required : true,
				rangelength : [5,10],
            },		
            adpw1 : {
                required : true,
				rangelength : [5,10],
				equalTo: "#adpw"
            },										
        },
        messages : {
            adname : {
                required : '帐号不能为空',
				rangelength : '长度介于3-10之间',
            },
			adpw : {
                required : '密码不能为空',
				rangelength : '长度介于5-10之间',
            },
			adpw1 : {
                required : '密码不能为空',
				rangelength : '长度介于5-10之间',
				equalTo: "两次输入密码不一致"
            },			
        }	
    });
});
</script>
<style>
body{font-size:12px;}
.sminput{width:30px; text-align:center;}
td a{ margin:0 5px;}
tr{ height:40px;}
.red{ color:#F00}
</style>
<div id="content">
	<div id="main">
    	<div class="pad20">
        	<if condition="$myself neq 1">
                <include file="default:navig" />   
                <div>
                    <p style="text-align:right;"><input onclick="selflo('{$lasturl}')" class="button" type="submit" value="返回上一级" /></p>
                </div>
            </if>
			<div id="tabs">            
                <ul>
               		 <li><a href="#tabs-1">{$tabs}</a></li>
                </ul>               
                
                <div id="tabs-1">
                <form id="addPart" method="post" action="{:U('Sysdo/aduser')}">
                <input type="hidden" name="act" value="{$act}" />
                <if condition="$myself neq 1">
                	<input type="hidden" name="callback" value="{$callback}" />
                <else />
                	<input type="hidden" name="callback" value="__SELF__" />    
                </if>    
                <input type="hidden" name="id" value="{$res['id']}" />                
                <table border="0" cellpadding="0" cellspacing="0"> 
				 <tr>   
                 	<td>帐号：</td>
                    <td><input class="w160" name="adname" type="text" value="{$res['adname']}"  <if condition="$act eq 'edit' ">readonly="readonly"</if>  /><label class="field_notice w200"><span class="red">*</span>必填</label></td>
                 </tr>                 
                 <tr>   
                 	<td>密码：</td>
                    <td><input class="w160" id="adpw" name="adpw" type="password"/><label class="field_notice"><span class="red">*</span>必填</label></td>
                 </tr>
				<tr>
                 	<td>再输入密码：</td>
                    <td><input class="w160" id="adpw1" name="adpw1" type="password"/><label class="field_notice"><span class="red">*</span>必填</label></td>
                 </tr>
                 <if condition="$myself neq 1">
                 <tr>
                 	<td>权限组：</td>
                    <td>
                    	<input id="groups" name="groups" type="radio" value="1" <if condition="$res['groups'] eq 1">checked="checked"</if>/><span>超级管理员</span>
                        <input id="groups" name="groups" type="radio" value="2" <if condition="$res['groups'] eq 2">checked="checked"</if>/><span>管理员</span>
                    </td>
                 </tr>
                 <tr>
                 	<td>&nbsp;</td>
                    <td>
                    	<p>
                        	说明:<br />
                            	1.超级管理员不需要设置权限<br />
                            	2.普通管理员需要设置权限
                        </p>
                    </td>
                 </tr> 
                 </if>                        	                                
                 <tr>
                 	<td colspan="2"><input class="button" type="submit" value="执行" /></td>
                 </tr>
                 </table>
                 </form>
                </div>                                 
			</div>  
        </div>
	</div>
</div>            
                
<include file="Public:footer" />    